function getFileBase64(file) {
    return new Promise((resolve, reject) => {
        let reader = new FileReader();
        reader.readAsDataURL(file);
        reader.onload = function (e) {
            let res = e.target.result.split(',')[1]
            // 转换已经完成
            resolve(res);
        };
    })
}
export default getFileBase64;
